<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /*alert("要跳转了");
    location.href = "https://www.baidu.com";*/

    //3秒后跳转到首页
    document.write("3秒后跳转到首页....")
    setTimeout(function (){
        location.href = "https://www.baidu.com";
    },3000);
</script>
</body>
</html>